package com.etalk.crm.client.interfaces;

import com.etalk.crm.client.fallbacks.MessageClientHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Jordan
 */
@FeignClient(name="${feign.client.message.name}",url = "${feign.client.message.url}",fallback= MessageClientHystrix.class)
public interface MessageClient {

    /**
     * 工作流完成发送钉钉提醒
     * @param msg 消息内容
     * @return
     */
    @PostMapping("/ding/talk/workflow/finish")
    String workflowFinish(@RequestParam String msg);

    /**
     * 微信成绩收集后发钉钉消息提醒cc/ssc
     * @param loginName 学员
     * @param cnName 姓名
     * @param description 本次成绩的描述
     * @param score 成绩
     * @return
     */
    @PostMapping("/ding/talk/score/collection/result")
    String scoreCollectionResult(@RequestParam String loginName, @RequestParam String cnName,@RequestParam String description, @RequestParam String score);

}
